feat: 키워드 알림 기능 (관심 키워드 상품 근처 등록 시 알림)#18
Open
chaeyoungeee wants to merge 1 commit into
Open
Conversation
관심 키워드를 등록해두면 일치하는 상품이 근처에 새로 등록될 때 인앱 알림을 받는 기능을 추가합니다. - KeywordNotification 엔티티 및 구독 CRUD API (/me/keywords) - 상품 등록 시 키워드 매칭 + Redis GEO 근처 회원 필터 후 알림 생성 - RedisUtil.getNearByMemberIds 추가 (MEMBER_KEY 반경 검색) - ProductService 컴파일 오류 수정 (findByKeyword 메서드 시그니처 복구) Closes #17 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
개요
관심 키워드를 미리 등록해두면, 해당 키워드와 일치하는 상품이 내 주변에 새로 등록될 때 인앱 알림을 받는 기능입니다.
Closes #17
변경 사항
1. 키워드 구독 CRUD
KeywordNotification엔티티 (member+keyword,(member_id, keyword)유니크 제약)MemberController)POST /api/v1/member/me/keywords— 키워드 등록GET /api/v1/member/me/keywords— 내 키워드 목록 조회DELETE /api/v1/member/me/keywords/{id}— 키워드 삭제2. 신규 상품 등록 시 매칭 알림
SaveGoodsUseCase에서 상품 저장 후KeywordNotificationService.notifyForNewGoods(goods)호출LIKE %keyword%) 구독자 조회MEMBER_KEY)로 상품 반경 내 회원만 필터 →RedisUtil.getNearByMemberIds추가Notification+NotificationHistory생성 → 기존 알림 조회 API(/me/notifications)에 그대로 노출3. 부수 수정 (별도 이슈성)
ProductService.java가main에서 메서드 시그니처 누락으로 컴파일 불가 상태였습니다(acca813에서 유입). 빌드를 위해findByKeyword(String)시그니처를 최소 복구했습니다. 본 기능과 무관하나 빌드 차단 요소라 함께 포함했습니다.설계 노트 / 향후 확장
Member에 fcmToken이 없고 FCM 발송 인프라가 없어 인앱 알림으로 우선 구현했습니다. 추후 FCM 푸시 연동 시notifyForNewGoods내에서 발송 로직만 추가하면 됩니다.@TransactionalEventListener(AFTER_COMMIT)또는 비동기로 분리 가능합니다.테스트
./gradlew build -x test통과 (전 모듈 컴파일/패키징 성공)🤖 Generated with Claude Code